package com.zzyx.service.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.zzyx.bean.Tingzhen;
import com.zzyx.dao.TingzhenDAO;
import com.zzyx.service.TingzhenService;

@SuppressWarnings("unchecked")
public class TingzhenServiceImpl implements TingzhenService {
	private TingzhenDAO tingzhenDao;

	public TingzhenDAO gettingzhenDao() {
		return tingzhenDao;
	}

	public void settingzhenDao(TingzhenDAO tingzhenDao) {
		this.tingzhenDao = tingzhenDao;
	}

	public void delete(Tingzhen e) {
		tingzhenDao.delete(e);
	}

	public void deleteAll(Collection<Tingzhen> c) {
		tingzhenDao.deleteAll(c);

	}

	public void deleteById(Class<Tingzhen> entityClass, Integer id) {
		tingzhenDao.deleteById(entityClass, id);

	}

	public List<Tingzhen> findAll(Class<Tingzhen> entityClass) {

		return tingzhenDao.findAll(entityClass);
	}

	public List<Tingzhen> findByAll(DetachedCriteria dc) {
		return tingzhenDao.findByAll(dc);
	}

	public List<Tingzhen> findByCriteria(DetachedCriteria dc, int firstResult,
			int maxResult) {
		return tingzhenDao.findByCriteria(dc, firstResult, maxResult);
	}

	public List<Tingzhen> findByCriteria(DetachedCriteria dc) {

		return tingzhenDao.findByCriteria(dc);
	}

	public List<Tingzhen> findByHql(String hql, Map<String, Object> param,
			int firstResult, int maxResult) {
		return tingzhenDao.findByHql(hql, param, firstResult, maxResult);
	}

	public Tingzhen findById(Class<Tingzhen> entityClass, Integer id) {
		return tingzhenDao.findById(entityClass, id);
	}

	public List<Tingzhen> findByProperty(Class<Tingzhen> entityClass,
			String propertyName, Object value, int type) {
		return tingzhenDao.findByProperty(entityClass, propertyName, value,
				type);
	}

	public Tingzhen findUniqueResult(String sql) {
		return tingzhenDao.findUniqueResult(sql);
	}

	public void save(Tingzhen entity) {
		tingzhenDao.save(entity);
	}

	public void saveOrUpdate(Tingzhen entity) {
		tingzhenDao.saveOrUpdate(entity);

	}

	public void update(Collection<Tingzhen> c) {
		tingzhenDao.update(c);

	}

	public List<Tingzhen> findAll() {
		return tingzhenDao.findAll(Tingzhen.class);
	}

	public List<Tingzhen> findByHql(String hql) {
		return tingzhenDao.findByHql(hql);
	}
}
